package com.oydsoft.auth.api;

import com.oydsoft.common.model.request.LoginRequest;
import com.oydsoft.common.model.response.JwtResult;
import com.oydsoft.common.model.response.LoginResult;
import com.oydsoft.common.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

@Api(value = "用户认证", description = "用户认证接口")
public interface AuthControllerApi {
    @ApiOperation("登录")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "账户名称", name = "username", required = true, example = "admin",paramType = "form"),
            @ApiImplicitParam(value="密码",name="password",required = true,example = "123",paramType = "form"),
            @ApiImplicitParam(value = "验证码", name = "verifycode", required = false, example = "XABC",paramType = "form"),
    })
    @PostMapping("/userlogin")
    public LoginResult login(LoginRequest loginRequest)throws Exception;

    @ApiOperation("退出")
    @PostMapping("/userlogout")
    public ResponseResult logout()throws Exception;

    @ApiOperation("查询用户jwt令牌")
    @GetMapping("/userjwt")
    public JwtResult userjwt()throws Exception;

    @GetMapping("/getInfo")
    public Object getInfo()throws Exception;

    @GetMapping("/getRouters")
    public Object getRouters()throws Exception;

}
